doe_optimize_rsm Function

public function doe_optimize_rsm(mdl, x_low, x_high, goal, target, tol, max_iter) result(opt)

Optimizes a fitted response surface within a box of factor bounds.

The model is assumed to be defined in coded variables , which are related to the natural variables by

The problem solved depends on the goal:

  • max: maximize
  • min: minimize
  • target: minimize

subject to . A projected gradient method with an Armijo backtracking line search is used. Gradients are computed using central differences, which are essentially exact for the polynomial models used here. The search is repeated from the design center and from points near the corners of the coded region (up to 64 corner patterns), and the best result is returned. A run is considered converged when the norm of the projected gradient step, , falls below the tolerance.

For quadratic models (nway <= 2) and the max or min goals, the stationary point is first computed analytically (see doe_stationary_point). If it lies within the bounds and is of the matching type (a maximum for max, a minimum for min), it is the global optimum and is returned directly. Otherwise the iterative search is used.

Note, the result is a local optimum of the fitted model, found from multiple starting points; it is not a guarantee of a global optimum. The optimum may lie on the boundary of the factor region, and extrapolation beyond the region of the experimental data should be confirmed experimentally.

Arguments

Type IntentOptional Attributes Name
class(doe_model), intent(in) :: mdl

The fitted DOE model, defined in coded variables.

real(kind=real64), intent(in), dimension(:) :: x_low

The lower natural-scale bound for each factor.

real(kind=real64), intent(in), dimension(:) :: x_high

The upper natural-scale bound for each factor. This array must be the same size as x_low, and each element must exceed the corresponding element of x_low.

character(len=*), intent(in), optional :: goal

The optimization goal: max (the default), min, or target.

real(kind=real64), intent(in), optional :: target

The target response value. This is required if goal is target, and is ignored otherwise.

real(kind=real64), intent(in), optional :: tol

The convergence tolerance on the projected gradient step. The default is 1.0d-8.

integer(kind=int32), intent(in), optional :: max_iter

The maximum number of iterations allowed for each starting point. The default is 1000.

Return Value type(doe_optimization_result)

A doe_optimization_result containing the optimal factors in both coded and natural scale, the predicted response at the optimum, the iteration count and convergence flag of the best run, the method name, and the tolerance used.